export default {
	data() {
		return {
			msgList: []
		}
	},
	async onLoad(options) {
		console.log("messages index onLoad: ", options);
		await this.getMessage();
	},
	async onShow() {},
	onHide() {},
	async onPullDownRefresh() {
		await this.getMessage();
		uni.stopPullDownRefresh();
	},
	methods: {
		async getMessage() {
			const msgRes = await this.$uniCloudCallFunction({
				name: 'xxf-message',
				action: "getMessage",
				data: {
					uid: this.$store.state.login.uid,
				}
			});
			console.log("msgRes: ", msgRes);
			this.msgList = msgRes.list || {};

		}
	},
}